# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=deja-dup
pkgver=42.1
pkgrel=0
pkgdesc="Simple backup tool for GNOME"
url="https://wiki.gnome.org/Apps/DejaDup"
arch="all !s390x !mips !mips64" # libhandy
license="GPL-3.0-or-later"
depends="dbus:org.freedesktop.Secrets"
makedepends="meson gtk+3.0-dev json-glib-dev libhandy-dev
	libsecret-dev libsoup-dev vala itstool appstream-glib
	desktop-file-utils"
checkdepends="coreutils diffutils"
subpackages="$pkgname-lang $pkgname-doc"
source="https://gitlab.gnome.org/World/deja-dup/-/archive/$pkgver/deja-dup-$pkgver.tar.gz"
options="!check" # fail hard on builders, work on CI and locally

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="9c5d81245ebc7254c5b4e5f8a7c9eb0d9df9f5555bc545bb5a5fca02f26a01a01cc474c757fdb3deeca3697d994c9e00ffa012f4f9b341f63a2cab17e0ac9d9c  deja-dup-42.1.tar.gz"
